package shiyanbao;

public class Course {
    private String courseId;     // 课程编号
    private String courseName;   // 课程名称
    private String location;     // 上课地点
    private String time;         // 上课时间
    private Teacher teacher;     // 授课教师（关联教师类）

    // 构造方法：初始化课程基本信息
    public Course(String courseId, String courseName, String location, String time) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
        this.teacher = null; // 初始无授课教师，后续由教师“开课”时关联
    }

    // Getter & Setter 方法
    public String getCourseId() { return courseId; }
    public void setCourseId(String courseId) { this.courseId = courseId; }

    public String getCourseName() { return courseName; }
    public void setCourseName(String courseName) { this.courseName = courseName; }

    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }

    public String getTime() { return time; }
    public void setTime(String time) { this.time = time; }

    public Teacher getTeacher() { return teacher; }
    public void setTeacher(Teacher teacher) { this.teacher = teacher; }

}